package com.xu.boot.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 短地址信息表
 * </p>
 *
 * @author xuguan
 * @since 2024-05-25
 */
@Getter
@Setter
@TableName("short_url_info")
public class ShortUrlInfoEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;

    @TableField("short_url")
    private String shortUrl;

    @TableField("origin_url")
    private String originUrl;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Override
    public String toString() {
        return "ShortUrlInfoEntity{" +
                "id=" + id +
                ", shortUrl='" + shortUrl + '\'' +
                ", originUrl='" + originUrl + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
